<?php

declare(strict_types=1);

namespace So\App\Request\Backend;

use So\App\Model\Backend\Admin;
use So\Validation;

class AuthGroupRequest extends Validation
{
    public $scene = [

    ];

    public function rules(): array
    {
        return [
            'id'=>'filled|integer',
            'rules'=>'required|array',
            'pid'=>'required|integer',
            'name'=>'required',
            'status'=>'required|boolean',
        ];
    }

    public function messages(): array
    {
        return [
            'rules.required'=>"请选择权限",
            'pid.required'=>"请选择父级",
            'name.required'=>"请输入名称",
            'status.required'=>"请选择状态",
            'rules.array'=>"权限格式错误",
            'pid.integer'=>"父级格式错误",
            'status.boolean'=>"状态格式错误",
        ];
    }
}